1 import os
2 from
subprocess import call
3
4 import sys

5
6 try
:
7     
from Tkinter import *
8 except ImportError:
9     
from tkinter import *
10
11 try
:
12     import ttk
13     py3 = False
14 except ImportError:
15     import tkinter.ttk
as ttk
16     py3 = True
17 def click_checkinn():
18     call([
"python", "checkin_gui_and_program.py"])
19 def click_list():
20     call([
"python", "listgui.py"])
21 def click_checkout():
22     call([
"python", "checkoutgui.py"])
23 def click_getinfo():
24     call([
"python","getinfoui.py"])
25
26
27 class
HOTEL_MANAGEMENT:
28     def __init__(self):
29         root = Tk()
30         _bgcolor =
'#ffffff' # X11 color: 'gray85'
31         _fgcolor =
'#000000' # X11 color: 'black'
32         _compcolor =
'#ffffff' # X11 color: 'white'
33         _ana1color =
'#ffffff' # X11 color: 'white'
34         _ana2color =
'#ffffff' # X11 color: 'white'
35         font14 =
"-family {Segoe UI} -size 15 -weight bold -slant " \
36             
"roman -underline 0 -overstrike 0"
37         font16 =
"-family {Swis721 BlkCn BT} -size 40 -weight bold " \
38             
"-slant roman -underline 0 -overstrike 0"
39         font9 =
"-family {Segoe UI} -size 9 -weight normal -slant " \
40             
"roman -underline 0 -overstrike 0"
41
42         root.geometry(
"963x749+540+110")
43         root.title(
"Hotel Management System")
44         root.configure(highlightbackground=
"#d9d9d9")
45         root.configure(highlightcolor=
"black")
46
47
48
49         self.menubar = Menu(root,font=font9,bg=_bgcolor,fg=_fgcolor)
50         root.configure(menu = self.menubar)
51
52
53
54         self.Frame1 = Frame(root)
55         self.Frame1.place(relx=
0.02, rely=0.03, relheight=0.94, relwidth=0.96)
56         self.Frame1.configure(relief=GROOVE)
57         self.Frame1.configure(borderwidth=
"2")
58         self.Frame1.configure(relief=GROOVE)
59         self.Frame1.configure(highlightbackground=
"#d9d9d9")
60         self.Frame1.configure(highlightcolor=
"black")
61         self.Frame1.configure(width=
925)
62
63         self.Message6 = Message(self.Frame1)
64         self.Message6.place(relx=
0.09, rely=0.01, relheight=0.15, relwidth=0.86)
65         self.Message6.configure(font=font16)
66         self.Message6.configure(foreground=
"#000000")
67         self.Message6.configure(highlightbackground=
"#d9d9d9")
68         self.Message6.configure(highlightcolor=
"black")
69         self.Message6.configure(text=
'''Hotel Management System''')
70         self.Message6.configure(width=
791)
71
72         self.Button2 = Button(self.Frame1)
73         self.Button2.place(relx=
0.18, rely=0.17, height=103, width=566)
74         self.Button2.configure(activebackground=
"#d9d9d9")
75         self.Button2.configure(activeforeground=
"#000000")
76         self.Button2.configure(disabledforeground=
"#bfbfbf")
77         self.Button2.configure(font=font14)
78         self.Button2.configure(foreground=
"#000000")
79         self.Button2.configure(highlightbackground=
"#d9d9d9")
80         self.Button2.configure(highlightcolor=
"black")
81         self.Button2.configure(pady=
"0")
82         self.Button2.configure(text=
'''1.CHECK IN''')
83         self.Button2.configure(width=
566)
84         self.Button2.configure(command=click_checkinn)
85
86         self.Button3 = Button(self.Frame1)
87         self.Button3.place(relx=
0.18, rely=0.33, height=93, width=566)
88         self.Button3.configure(activebackground=
"#d9d9d9")
89         self.Button3.configure(activeforeground=
"#000000")
90         self.Button3.configure(disabledforeground=
"#bfbfbf")
91         self.Button3.configure(font=font14)
92         self.Button3.configure(foreground=
"#000000")
93         self.Button3.configure(highlightbackground=
"#d9d9d9")
94         self.Button3.configure(highlightcolor=
"black")
95         self.Button3.configure(pady=
"0")
96         self.Button3.configure(text=
'''2.SHOW GUEST LIST''')
97         self.Button3.configure(width=
566)
98         self.Button3.configure(command=click_list)
99
100         self.Button4 = Button(self.Frame1)
101         self.Button4.place(relx=
0.18, rely=0.47, height=93, width=566)
102         self.Button4.configure(activebackground=
"#d9d9d9")
103         self.Button4.configure(activeforeground=
"#000000")
104         self.Button4.configure(disabledforeground=
"#bfbfbf")
105         self.Button4.configure(font=font14)
106         self.Button4.configure(foreground=
"#000000")
107         self.Button4.configure(highlightbackground=
"#d9d9d9")
108         self.Button4.configure(highlightcolor=
"black")
109         self.Button4.configure(pady=
"0")
110         self.Button4.configure(text=
'''3.CHECK OUT''')
111         self.Button4.configure(width=
566)
112         self.Button4.configure(command=click_checkout)
113
114         self.Button5 = Button(self.Frame1)
115         self.Button5.place(relx=
0.18, rely=0.61, height=103, width=566)
116         self.Button5.configure(activebackground=
"#d9d9d9")
117         self.Button5.configure(activeforeground=
"#000000")
118         self.Button5.configure(disabledforeground=
"#bfbfbf")
119         self.Button5.configure(font=font14)
120         self.Button5.configure(foreground=
"#000000")
121         self.Button5.configure(highlightbackground=
"#d9d9d9")
122         self.Button5.configure(highlightcolor=
"black")
123         self.Button5.configure(pady=
"0")
124         self.Button5.configure(text=
'''4.GET INFO OF ANY GUEST''')
125         self.Button5.configure(width=
566)
126         self.Button5.configure(command=click_getinfo)
127
128         self.Button6 = Button(self.Frame1)
129         self.Button6.place(relx=
0.18, rely=0.77, height=103, width=566)
130         self.Button6.configure(activebackground=
"#d9d9d9")
131         self.Button6.configure(activeforeground=
"#000000")
132         self.Button6.configure(disabledforeground=
"#bfbfbf")
133         self.Button6.configure(font=font14)
134         self.Button6.configure(foreground=
"#000000")
135         self.Button6.configure(highlightbackground=
"#d9d9d9")
136         self.Button6.configure(highlightcolor=
"black")
137         self.Button6.configure(pady=
"0")
138         self.Button6.configure(text=
'''5.EXIT''')
139         self.Button6.configure(width=
566)
140         self.Button6.configure(command=quit)
141         root.mainloop()

142
143
144 if
__name__ == '__main__':
145     GUUEST=HOTEL_MANAGEMENT()


Gõ tìm kiếm nhanh...